<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

use think\Route;
// Route::rule('new/:id','index/News/read');
Route::controller('news','index/News');
Route::get('hello/:name', function($name) {
    return 'bibao,' . $name;
});
Route::resource('blog','index/Blog');

return [
    // 'blog' => 'index/Blog',
    // '__pattern__' => [
    //     'name' => '\w+',
    // ],
    // '[hello]'     => [
    //     ':id'   => ['index/hello', ['method' => 'get'], ['id' => '\d+']],
    //     ':name' => ['index/hello', ['method' => 'post']],
    // ],

    // '[blog]' => [
    //     ':id' => ['index/Blog/read', ['method' => 'get'], ['id' => '\d+']],
    //     ':name' => ['index/Blog/read', ['method' => 'post'], ['name' => '\w+']],
    //     '__miss__' => 'index/Blog/miss'
    // ],

    'new/:id' => ['index/News/read', ['method' => 'get'],['id' => '\w+']],

    // '__miss__' => 'index/Index/miss',


];
